<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目类别管理</title>
<link href="<%=path%>/css/rpms_right.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/check.js"></script>
</head>

<body>
    <div class="main">
        <h1>项目类别管理</h1>
        <hr />
        <h3>现有的项目类别</h3>
        <table width="100%">
            <tr>
                <td class="table_head" width="200px">名称</td>
                <td class="table_head">描述</td>
                <td class="table_head" width="100px">状态</td>
                <td class="table_head" width="100px">操作</td>
            </tr>
                <s:iterator id="item" value="projectTypeList">
                <tr>
                     <td>
                        <s:property value="name"/>
                     </td>
                     <td>
                     	<s:property value="description"/>
                     </td>
                  <s:if test="enable">
                      <td>开放</td>
                      <td>
                        <a href="projectTypeChange.action?actionType=0&projectTypeID=<s:property value='id'></s:property>">关闭</a>
                      </td>
                  </s:if>
                  <s:else>
                  	  <td>关闭</td>
                      <td><a href="projectTypeChange.action?actionType=1&projectTypeID=<s:property value='id'></s:property>">启动</a></td>
                  </s:else> 
                </tr> 
                </s:iterator>
        </table>
        
        <h3>添加新的类别</h3>
        <form action="projectTypeAdd.action" method="post" onsubmit="javascript:return checkForm(this);">
        <table align="center">
            <tr>
                <td class="form_strong" width="150px">名称：</td>
                <td><input type="text" name="projectType.name" onblur="javascript:checkNotNull(this);"/></td>
            </tr>
            <tr>
                <td class="form_strong" >描述：</td>
                <td>
                <textarea cols="50" rows="5" name="projectType.description" onblur="javascript:checkNotNull(this);"></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                	<input type="submit" value="  添加  " />
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
